class Solution:
    def differenceOfSum(self, nums: list[int]) -> int:
        sum_1 = sum_2 = 0
        for num in nums:
            sum_1 += num
            for it in str(num):
                sum_2 += int(it)
        return abs(sum_1 - sum_2)